function gallery (src){
    bd = $("body");
    html = "<div class='gallery-overlay'><div class='gallery-photo'><span></span><img src='"+ src +"'></div>";
    html += "<div class='gallery-thumb'></div><a class='gallery-close' href='javascript:;' title='关闭'>&times;</a></div>";
    bd.css("overflow-y", "hidden").append(html);
    var overlay = $(".gallery-overlay"),
        photo = $(".gallery-photo"),
        photoImg = photo.find("img"),
        thumb = $(".gallery-thumb"),
        prev = $(".gallery-prev"),
        next = $(".gallery-next"),
        close = $(".gallery-close"),
        str = "";

    //浏览器缩放时候，重置
    function toResize() {
        var height = $(window).height();
        overlay.height(height);
        photo.css({"height": height - 200});
        photoImg.css({"max-height": height - 200});//解决safari下bug
    }
    toResize();
    $(window).resize(function() {
        toResize();
    });

    //关闭层
    function closeOverlay() {
        overlay.remove();
        bd.css("overflow-y", "auto");
    }
    close.on("click", function() {
        closeOverlay();
    });

    return false;
}